package cn.xfdzx.android.apps.shop.util;


import java.util.logging.Logger;

/**
 * Creator: Gu FanFan.
 * Date: 2018/7/2.
 * Description: Log 日志工具类.
 */
public class LoggerUtil {

    private LoggerUtil() {
        throw new UnsupportedOperationException("Can't instantiate me...");
    }

    public static final int VERBOSE = 2;
    public static final int DEBUG = 3;
    public static final int INFO = 4;
    public static final int WARN = 5;
    public static final int ERROR = 6;
    public static final int ASSERT = 7;

//    /**
//     * 初始化Logger.
//     * @param saveDisk 是否保存到磁盘里.
//     */
//    public static void initLogger(boolean saveDisk) {
//        Logger.addLogAdapter(new AndroidLogAdapter());
//        if (saveDisk)
//            Logger.addLogAdapter(new DiskLogAdapter());
//    }

    public static String logLevel(int value) {
        switch (value) {
            case VERBOSE:
                return "VERBOSE";
            case DEBUG:
                return "DEBUG";
            case INFO:
                return "INFO";
            case WARN:
                return "WARN";
            case ERROR:
                return "ERROR";
            case ASSERT:
                return "ASSERT";
            default:
                return "UNKNOWN";
        }
    }
}
